<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ include file="/commons/global.jsp" %>
<style>
.easyui-text{
	border-radius:5px;border:thin solid #ddd;
	border-color:#a4e9c1;
}
.easyui-text:focus{
	outline: none;
}
</style>
<script type="text/javascript">
function search(id,status,tableName,type){
    if(status==1){
    	 $('#dd').dialog({
             title : '添加表',
             width : '100%',
             height : '100%',
             href : "${ctxPath}/generator/readCodeFile?tableName="+tableName+"&type="+type,
         });
    }else{
        showMsg('代码未生成！');
    }
}
</script>
<div class="easyui-layout" data-options="fit:true,border:false" >
    <div data-options="region:'center',border:false" style="overflow-x:hidden;overflow-y: auto;padding: 3px;" >
    <div id="dd"></div>
      <table class="grid"  id="table">
        <colgroup>
            <col width="200">
            <col width="100">
            <col width="100">
            <col>
        </colgroup>
        <thead>
        <tr>
            <th>名称</th>
            <th>状态</th>
            <th>操作</th>
        </tr>
        </thead>
        <tbody>
        <tr>
            <td>实体（Entity）</td>
            <td> <span class="label label-success arrowed-in" style="position: relative;z-index: 0">${status==1?'已生成':'未生成'}</span></td>
            <td><button  class="easyui-linkbutton" onclick="search(1,${status},'${tableName}','entity')">查看</button></td>
        </tr>
        <tr>
            <td>业务层（Service）</td>
            <td> <span class="label label-success arrowed-in" style="position: relative;z-index: 0">${status==1?'已生成':'未生成'}</span></td>
            <td><button  class="easyui-linkbutton" onclick="search(1,${status},'${tableName}','service')">查看</button></td>
        </tr>
        <tr>
            <td>控制层（Controller）</td>
            <td> <span class="label label-success arrowed-in" style="position: relative;z-index: 0">${status==1?'已生成':'未生成'}</span></td>
            <td><button  class="easyui-linkbutton" onclick="search(1,${status},'${tableName}','controller')">查看</button></td>
        </tr>
        <tr>
            <td>前端web层（Add）</td>
            <td> <span class="label label-success arrowed-in" style="position: relative;z-index: 0">${status==1?'已生成':'未生成'}</span></td>
            <td><button  class="easyui-linkbutton" onclick="search(1,${status},'${tableName}','add')">查看</button></td>
        </tr>
        <tr>
            <td>前端web层（Edit）</td>
            <td> <span class="label label-success arrowed-in" style="position: relative;z-index: 0">${status==1?'已生成':'未生成'}</span></td>
            <td><button  class="easyui-linkbutton" onclick="search(1,${status},'${tableName}','edit')">查看</button></td>
        </tr>
        <tr>
            <td>前端web层（List）</td>
            <td> <span class="label label-success arrowed-in" style="position: relative;z-index: 0">${status==1?'已生成':'未生成'}</span></td>
            <td><button  class="easyui-linkbutton" onclick="search(1,${status},'${tableName}','list')">查看</button></td>
        </tr>
        <tr>
            <td>前端web层（View）</td>
            <td> <span class="label label-success arrowed-in" style="position: relative;z-index: 0">${status==1?'已生成':'未生成'}</span></td>
            <td><button  class="easyui-linkbutton" onclick="search(1,${status},'${tableName}','view')">查看</button></td>
        </tr>
        <tr>
            <td>前端web层（Treegrid）</td>
            <td> <span class="label label-success arrowed-in" style="position: relative;z-index: 0">${status==1?'已生成':'未生成'}</span></td>
            <td><button  class="easyui-linkbutton" onclick="search(1,${status},'${tableName}','treegrid')">查看</button></td>
        </tr>
        </tbody>
    </table>
</div>
</div>